package com.zwt.service.impl;

import com.zwt.service.ApiService;
import com.zwt.util.HttpClientUtils;
import com.zwt.util.JsonUtil;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * Created by zwt on 2018/8/24.
 */
@Service
public class ApiServiceImpl implements ApiService{
    @Override
    public String getJson(String url) {
        String json = JsonUtil.getJson(url);
        return json;
    }

    @Override
    public String getJson(String url, Map<String, Object> parms) {
        String json = HttpClientUtils.sendPostRequest(url, parms);
        return json;
    }
}
